package com.example.finalapp;

import com.parse.ParseUser;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class HomeAdminActivity extends Activity {
	EditText edit_text_SSID;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_home_admin);

		edit_text_SSID= (EditText)findViewById(R.id.editTextSSID);
		
		final Button button = (Button) findViewById(R.id.continue_button);
		button.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) 
			{
				//put SSID in admin's row
				ParseUser.getCurrentUser().put("SSID", edit_text_SSID.getText().toString());
				//go to home_continue
				Intent intent = new Intent(HomeAdminActivity.this, HomeActivity.class);
				startActivity(intent);
			}
		});

		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.home, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		return super.onOptionsItemSelected(item);
	}
}
